<template>
  <j-modal
    :title='title'
    :width='900'
    :visible='visibleOne'
    :maskClosable='false'
    :confirmLoading='confirmLoading'
    @cancel='handleCancel'
    cancelText='关闭'>
    <template slot='footer'>
      <a-button @click='handleCancel'>关闭</a-button>
    </template>
    <div class='json_box'>
      <json-viewer
        :value='jsonOld'
        expanded
        :copyable='true'
        boxed
        sort></json-viewer>
      <json-viewer
        :value='jsonNew'
        expanded
        copyable
        boxed
        sort></json-viewer>
    </div>

  </j-modal>
</template>

<script>
import { getAction, httpAction, postAction } from '@/api/manage'
import { pick } from 'lodash'

export default {
  name: 'carModelListModel',
  props: {
    jsonOld: {
      type: String,
      default: ''
    },
    jsonNew: {
      type: String,
      default: ''
    },
    visibleOne: {
      type: Boolean,
      default: false
    }
  },

  data() {
    return {
      title: 'JSON对比'
    }
  },
  components: {},
  created() {

  },
  methods: {
    handleCancel() {
      this.visible = false
      this.$emit('update:visibleOne', false)
    }
  }
}
</script>

<style lang='less' scoped>
.json_box {
  display: flex;
  justify-content: space-between;
  align-items:center;
  /deep/ .jv-container{
    width:48% !important;
  }
}
</style>